<%@ page import="pojo.Card" %>
<%@ page import="pojo.Manager" %><%--
  Created by IntelliJ IDEA.
  User: konley
  Date: 2020/6/14
  Time: 11:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>开卡 | 学生饭卡管理系统 </title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/css.css"/>
    <script src="${pageContext.request.contextPath }/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath }/js/jquery-3.4.1.js" type="text/javascript"
            charset="utf-8"></script>
    <style type="text/css">
        body{
            background-image: url("photo/bg.jpg");
        }

    </style>
</head>
<body>
<% Manager manager = (Manager)request.getAttribute("manager"); %>
<!--top-->
<div style="background-color:#444;">
    <div class="container">
        <div class="row">
            <h2 style="color: white;font-weight: bold;" >校园一卡通系统 | <span style="color: #FF6666;">开卡</span></h2>
        </div>
    </div>
</div>
<div class="container">
    <div class="row">
        <div class="col-sm-6 col-sm-offset-3">
            <div class="panel panel-success " style="margin-top: 50px;">
                <div class="panel-heading">
                    <h4><strong>开卡</strong></h4>
                </div>
                <div class="panel-body">
                    <form name="reg" action="ManagerServlet" method="post" class="form-horizontal" role="form">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">学号</label>
                                <div class="col-sm-8">
                                    <input name="sid" class="form-control" type="text" placeholder="录入学生学号"/>
                                </div>
                            </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">密码</label>
                            <div class="col-sm-8">
                                <input name="password" class="form-control" type="password"  placeholder="录入学生密码"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓名</label>
                            <div class="col-sm-8">
                                <input name="name" class="form-control" type="text"  placeholder="录入学生姓名"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-8">
                                <input name="sex" class="form-control" type="text"  placeholder="录入学生性别"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">系别</label>
                            <div class="col-sm-8">
                                <input name="dept" class="form-control" type="text"  placeholder="录入学生系别"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">电话</label>
                            <div class="col-sm-8">
                                <input name="tel" class="form-control" type="text"  placeholder="录入学生联系方式" />
                            </div>
                        </div>
                        <hr>
                        <div class="form-group  has-error">
                            <label class="col-sm-2 control-label"  >充值金额</label>
                            <div class="col-sm-5">
                                <input name="money" class="form-control"  placeholder="请输入充值金额，单位元" type="text"/>
                            </div>
                        </div>
                        <div class="form-group  has-error">
                            <label class="col-sm-2 control-label"  >权限验证</label>
                            <div class="col-sm-5">
                                <input name="managerPassword" class="form-control" type="password" placeholder="请输入管理员密码">
                            </div>
                        </div>
                        <% if (request.getAttribute("msg") != null) { %>
                        <div class="alert alert-danger" style="text-align: center">提示：<%=request.getAttribute("msg")%></div>
                        <% } %>
                        <hr>
                        <div class="form-group text-center">
                            <input name="m" type="hidden" value="add"/>
                            <!--带上mid做二次验证-->
                            <input name="mid" type="hidden" value="<%=manager.getMid()%>"/>
                            <input type="submit" value="确认开卡" class="btn btn-success"/>
                            <a href="managerView.jsp">
                            <button type="button" class="btn btn-danger ">返回管理</button>
                            </a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>